package com.liu.yml.controller;

import com.liu.yml.config.PersonProperties;
import com.liu.yml.config.WechatUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/hello")
public class HelloController {

    @Autowired
    private PersonProperties person;
    @Autowired
    private WechatUtil wechatUtil;

    @RequestMapping("/01")
    public String hello01(){
        log.info("person类  {}",person.toString());
        return "hello,SpringBoot! " + person.toString();
    }
    @RequestMapping("/wechat")
    public String wechat(){
        return wechatUtil.toString();
    }
}
